<template>
  <vue-friendly-iframe ref="iframe" class="iframe" :src="viewReportURL" />
</template>

<script>
import { config } from '@/utils'
import { getToken } from '@/utils/auth'

export default {
  data() {
    return {
      viewReportURL: ''
    }
  },
  mounted() {
    this.viewReportURL = config.baseURL + '/ureport/preview?_i=1&_t=1,2,3,5,6,7,8,9&_u=dataBase:' + this.$route.query.fileName + '&Authorization=Bearer ' + getToken()
  }
}
</script>

<style scoped>
.iframe {
  margin:0;
  padding:0;
  position:absolute;
  width:100%;
  top: 0;
  bottom:0;
  left: 0;
}
</style>
